#!/usr/bin/env zunit


@setup {
  export ZBIN="${ZPFX}/bin"
  export os_type="${OSTYPE//[0-9\.]*/}"
  zinit default-ice --quiet from'gh-r' nocompile lbin'!'
}

# @test 'atmos' {  Universal Tool for DevOps and Cloud Automation (works with terraform, helm, helmfile, etc)
#   skip 'null'
#   run zinit for lbin'!* -> atmos' @cloudposse/atmos; assert $state equals 0
#   local atmos="$ZBIN/atmos"; assert "$atmos" is_executable
#   $atmos version; assert $state equals 0
# }
# @test 'bit' {  A tool for composable software development
#   skip 'skip bit test due to gh-r version bug'
#   run zinit lbin'!bit* -> bit' for @teambit/bit; assert $state equals 0
#   local bit="$ZBIN/bit"; assert "$bit" is_executable
#   $bit --version; assert $state equals 0
# }
# @test 'neovim::appimage' { # Vim-fork focused on extensibility and usability
#   skip 'null'
#   run zinit bpick'*appimage*' id-as'neovim/appimage' for neovim/neovim
#   assert $state equals 0; assert $output contains 'nvim.appimage'
#   assert "$ZINIT[PLUGINS_DIR]/neovim---appimage/nvim.appimage" is_file
# }
# @test 'neovim::binary' { # Vim-fork focused on extensibility and usability
#   skip 'null'
#   run zinit lbin'!**/nvim' id-as'neovim/binary' for neovim/neovim; assert $state equals 0; assert $output does_not_contain 'appimage'
#   local nvim="$ZBIN/nvim"; assert "$nvim" is_executable
#   $nvim --version; assert $state equals 0
# }

@test 'act' { # Run your GitHub Actions locally
  run zinit for @nektos/act; assert $state equals 0
  local act="$ZBIN/act"; assert "$act" is_executable
  $act --version; assert $state equals 0
}
@test 'alacritty' { # Run your GitHub alacrittyions locally
  [[ $OSTYPE =~ 'linux*' ]] && skip "Alacritty test skipped on $os_type"
  run zinit for @alacritty/alacritty; assert $state equals 0
  local alacritty="$ZBIN/alacritty"; assert "$alacritty" is_executable
  $alacritty --version; assert $state equals 0
}
@test 'alist' { # A file list program that supports multiple storage, powered by Gin and React
  run zinit lbin'!* -> alist' for @alist-org/alist; assert $state equals 0
  local alist="$ZBIN/alist"; assert "$alist" is_executable
  $alist version; assert $state equals 0
}
@test 'asciigraph' { # Go package to make lightweight ASCII line graphs in command line apps with no external dependencies.
  run zinit for @guptarohit/asciigraph; assert $state equals 0
  local asciigraph="$ZBIN/asciigraph"; assert "$asciigraph" is_executable
  $asciigraph --help; assert $state equals 0
}
@test 'assh' { # make your ssh client smarter
  run zinit for @moul/assh; assert $state equals 0
  local assh="$ZBIN/assh"; assert "$assh" is_executable
  run $assh --version; assert $state equals 0
}
@test 'atuin' { #  Magical shell history
  run zinit ver'v14.0.0' for @ellie/atuin; assert $state equals 0
  local atuin="$ZBIN/atuin"; assert "$atuin" is_executable
  run $atuin --version; assert $state equals 0
}
@test 'aurora' { # Cross-platform beanstalkd queue server admin console
  run zinit for @xuri/aurora; assert $state equals 0
  local aurora="$ZBIN/aurora"; assert "$aurora" is_executable
  run $aurora -v; assert $state equals 0
}
@test 'bandwhich' { # Terminal bandwidth utilization tool
  [[ $OSTYPE =~ 'darwin*' ]] && skip "on $os_type"
  run zinit for @imsnif/bandwhich; assert $state equals 0
  local bandwhich="$ZBIN/bandwhich"; assert "$bandwhich" is_executable
  run $bandwhich --version; assert $state equals 0
}
@test 'bat' { # A cat(1) clone with wings
  run zinit for @sharkdp/bat; assert $state equals 0
  local bat="$ZBIN/bat"; assert "$bat" is_executable
  run $bat --version; assert $state equals 0
}
@test 'bazel' { # a fast, scalable, multi-language and extensible build system
  run zinit lbin"!bazel* -> bazel" for @bazelbuild/bazel; assert $state equals 0
  local bazel="$ZBIN/bazel"; assert "$bazel" is_executable
  run $bazel --version; assert $state equals 0
}
@test 'blast' { # Blast is a simple tool for API load testing and batch jobs
  [[ $OSTYPE =~ 'darwin*' ]] && skip "on $os_type"
  run zinit for @dave/blast; assert $state equals 0
  local blast="$ZBIN/blast"; assert "$blast" is_executable
  run $blast --dry=1; assert $state equals 0
}
@test 'boilr' { # boilerplate template manager that generates files or directories from template repositories
  run zinit for @tmrts/boilr; assert $state equals 0
  local boilr="$ZBIN/boilr"; assert "$boilr" is_executable
  [[ $OSTYPE =~ 'darwin*' ]] && assert "$output" contains "darwin_amd64" && pass
  run $boilr --help; assert $state equals 0
}
@test 'booklit' { # a pretty lit content authoring system
  run zinit for lbin'!* -> booklit' @vito/booklit; assert $state equals 0
  local booklit="$ZBIN/booklit"; assert "$booklit" is_executable
  run "$booklit" --version; assert $state equals 0
}
@test 'bottom' { # Yet another cross-platform graphical process/system monitor
  run zinit lbin'!**/btm' for ClementTsang/bottom; assert $state equals 0
  local bottom="$ZBIN/btm"; assert "$bottom" is_executable
  $bottom --version; assert $state equals 0
}
@test 'broot' { # A new way to see and navigate directory trees
  [[ $OSTYPE =~ 'darwin*' ]] && skip " on $os_type"
  run zinit lbin'!*${OSTYPE}*/* -> broot' for @Canop/broot; assert $state equals 0
  local broot="$ZBIN/broot"; assert "$broot" is_executable
  run "$broot" --version; assert $state equals 0
}
@test 'btop' { # A monitor of resources
  run zinit lbin'!**/btop' for aristocratos/btop; assert $state equals 0
  local btop="$ZBIN/btop"; assert "$btop" is_executable
  run $btop --version; assert $state equals 0
}
@test 'calico' { # Cloud native networking and network security
  run zinit lbin"!* -> calico" for @projectcalico/calico; assert $state equals 0
  local calico="$ZBIN/calico"; assert "$calico" is_executable
  run $calico --help; assert $state equals 0
}
@test 'certificates' { # An opinionated helper for generating tls certificates
  run zinit lbin"!* -> certificates" for @mvmaasakkers/certificates; assert $state equals 0
  local certificates="$ZBIN/certificates"; assert "$certificates" is_executable
  run $certificates --version; assert $state equals 0
}
@test 'checkmake' { # experimental linter/analyzer for Makefiles
  run zinit lbin'!checkmake* -> checkmake' for @mrtazz/checkmake; assert $state equals 0
  local checkmake="$ZBIN/checkmake"; assert "$checkmake" is_executable
  run $checkmake --version; assert $state equals 0
}
@test 'cog' { # Containers for machine learning
  run zinit lbin'!cog* -> cog' for @replicate/cog; assert $state equals 0
  local cog="$ZBIN/cog"; assert "$cog" is_executable
  run $cog --version; assert $state equals 0
}
@test 'compress' { # Optimized Go Compression Packages
  run zinit bpick'*.tar.gz' lbin'!s2c;s2d;s2sx;' for @klauspost/compress; assert $state equals 0
  local compress="$ZBIN/s2c"; assert "$compress" is_executable
  run $compress --help; assert $state equals 0
}
@test 'create-go-app' { # Create a new production-ready project with backend, frontend and deploy automation by running one CLI command
  run zinit for id-as'cgapp' @create-go-app/cli; assert $state equals 0
  local cgapp="$ZBIN/cgapp"; assert "$cgapp" is_executable
  [[ $OSTYPE =~ 'darwin*' ]] && assert "$output" contains "macOS_$(uname -m)" && pass
  $cgapp --version; assert $state equals 0
}
@test 'csview' { # Pretty csv viewer for cli with cjk/emoji support
  run zinit for @wfxr/csview; assert $state equals 0
  local csview="$ZBIN/csview"; assert "$csview" is_executable
  $csview --version; assert $state equals 0
}
@test 'delta' { # A syntax-highlighting pager for git, diff, and grep output
  run zinit for @dandavison/delta; assert $state equals 0
  local delta="$ZBIN/delta"; assert "$delta" is_executable
  $delta --version; assert $state equals 0
}
@test 'difftastic' { # A structural diff that understands syntax
  run zinit id-as'difft' for  @Wilfred/difftastic; assert $state equals 0
  local difftastic="$ZBIN/difft"; assert "$difftastic" is_executable
  $difftastic --version; assert $state equals 0
}
@test 'dive' { # A tool for exploring each layer in a docker image
  run zinit for @wagoodman/dive; assert $state equals 0
  local dive="$ZBIN/dive"; assert "$dive" is_executable
  $dive --version; assert $state equals 0
}
@test 'docker-buildx' { # A monitor of resources
  run zinit for lbin'!* -> buildx' @docker/buildx; assert $state equals 0
  local buildx="$ZBIN/buildx"; assert "$buildx" is_executable
  $buildx version; assert $state equals 0
}
@test 'docker-compose' { # Define and run multi-container applications with Docker
  run zinit lbin'!* -> docker-compose' for @docker/compose; assert $state equals 0
  local dc="$ZBIN/docker-compose"; assert "$dc" is_executable
  $dc --version; assert $state equals 0
}
@test 'docker-credential-helpers' { # A monitor of resources
  [[ $OSTYPE =~ 'linux*' ]] && skip "on $os_type"
  run zinit for lbin'!* -> docker-credential-desktop' @docker/docker-credential-helpers; assert $state equals 0
  local credential_desktop="$ZBIN/docker-credential-desktop"; assert "$credential_desktop" is_executable
  run $credential_desktop version; assert $state equals 0
}
@test 'documize' { # Modern Confluence alternative designed for internal & external docs, built with Go & Ember JS
  run zinit lbin'!* -> documize' for @documize/community; assert $state equals 0
  local documize="$ZBIN/documize"; assert "$documize" is_executable
  $documize version; assert $state equals 0
}
@test 'dstask' { # Git powered terminal-based todo/note manager -- markdown note page per task
  run zinit lbin'!*->dstask' bpick'^*import*' for @naggie/dstask; assert $state equals 0
  local dstask="$ZBIN/dstask"; assert "$dstask" is_executable
  $dstask help; assert $state equals 0
}
@test 'dua' { # View disk space usage and delete unwanted data, fast
  run zinit lbin'!**/dua' for @Byron/dua-cli; assert $state equals 0
  local dua="$ZBIN/dua"; assert "$dua" is_executable
  $dua --version; assert $state equals 0
}
@test 'duci' { # The simple CI server
  run zinit lbin'!**/duci' for @duck8823/duci; assert $state equals 0
  local duci="$ZBIN/duci"; assert "$duci" is_executable
  $duci version; assert $state equals 0
}
@test 'dust' { # A more intuitive version of du in rust
  run zinit lbin'!**/dust' for @bootandy/dust; assert $state equals 0
  local dust="$ZBIN/dust"; assert "$dust" is_executable
  $dust --version; assert $state equals 0
}
@test 'dyff' { # diff tool for YAML files, and sometimes JSON
  run zinit lbin'!**/dyff' for @homeport/dyff; assert $state equals 0
  local dyff="$ZBIN/dyff"; assert "$dyff" is_executable
  $dyff version; assert $state equals 0
}
@test 'etcd' { # Distributed reliable key-value store for the most critical data of a distributed system
  run zinit lbin'!**/etcd' for @etcd-io/etcd; assert $state equals 0
  local etcd="$ZBIN/etcd"; assert "$etcd" is_executable
  $etcd --version; assert $state equals 0
}
@test 'exa' { # A modern replacement for ls
  run zinit lbin'!**/exa' for @ogham/exa; assert $state equals 0
  local exa="$ZBIN/exa"; assert "$exa" is_executable
  $exa --version; assert $state equals 0
}
@test 'fclones' { # Efficient duplicate file Finder
  [[ $OSTYPE =~ 'darwin*' ]] && skip "on $os_type"
  run zinit  for @pkolaczk/fclones; assert $state equals 0
  local fclones="$ZBIN/fclones"; assert "$fclones" is_executable
  run "$fclones" --help; assert $state equals 0
}
@test 'fd' { # A fast, simple, and user-friendly alternative to find
  run zinit for @sharkdp/fd; assert $state equals 0
  local fd="$ZBIN/fd"; assert "$fd" is_executable
  $fd version; assert $state equals 0
}
@test 'fnm' { # Fast and simple Node.js version manager, built in Rust
  run zinit for @Schniz/fnm; assert $state equals 0
  local fnm="$ZBIN/fnm"; assert "$fnm" is_executable
  $fnm --version; assert $state equals 0
}
@test 'fogg' { # Manage Infrastructure as Code with less pain
  run zinit for @chanzuckerberg/fogg; assert $state equals 0
  local fogg="$ZBIN/fogg"; assert "$fogg" is_executable
  $fogg version; assert $state equals 0
}
@test 'fx' { # Terminal JSON viewer
  run zinit lbin'!* -> fx' for @antonmedv/fx; assert $state equals 0
  local fx="$ZBIN/fx"; assert "$fx" is_executable
  $fx -v; assert $state equals 0
}
@test 'fzf' { # A command-line fuzzy finder
  run zinit for @junegunn/fzf; assert $state equals 0
  local fzf="$ZBIN/fzf"; assert "$fzf" is_executable
  $fzf --version; assert $state equals 0
}
@test 'gaper' { # Builds and restarts a Go project when it crashes or some watched file changes
  [[ $OSTYPE =~ "linux*" ]] && skip "on $os_type"
  run zinit lbin'!**/gaper' for @maxcnunes/gaper; assert $state equals 0
  local gaper="$ZBIN/gaper"; assert "$gaper" is_executable
  $gaper --version; assert $state equals 0
}
@test 'gdu' { # Fast disk usage analyzer with console interface written in Go
  run zinit lbin'!* -> gdu' for @dundee/gdu; assert $state equals 0
  local gdu="$ZBIN/gdu"; assert "$gdu" is_executable
  $gdu --version; assert $state equals 0
}
@test 'gf' { # Fast disk usage analyzer with console interface written in Go
  run zinit lbin'!* -> gf' for @gogf/gf; assert $state equals 0
  local gf="$ZBIN/gf"; assert "$gf" is_executable
  $gf --version; assert $state equals 0
}
@test 'ggsrun' { # This is a CLI tool to execute Google Apps Script (GAS) at own terminal on local PC. Also this CLI tool can be used for managing files in Google Drive for OAuth2 and Service Account
  run zinit lbin'!* -> ggsrun' ver'v2.0.0' for @tanaikech/ggsrun; assert $state equals 0
  local git_sizer="$ZBIN/ggsrun"; assert "$git_sizer" is_executable
  $git_sizer --version; assert $state equals 0
}
@test 'gh-cli' { # GitHub’s official command line tool
  run zinit lbin'!**/gh' for @cli/cli; assert $state equals 0
  local gh_cli="$ZBIN/gh"; assert "$gh_cli" is_executable
  $gh_cli --version; assert $state equals 0
}
@test 'gh-hub' { # A command-line tool that makes git easier to use with GitHub
  run zinit cp"hub-*/etc/hub.zsh_completion -> _hub" for @github/hub; assert $state equals 0
  local hub="$ZBIN/hub"; assert "$hub" is_executable
  $hub --version; assert $state equals 0
}
@test 'ghg' { # Get the executable from github releases easily
  run zinit for @Songmu/ghg; assert $state equals 0
  local ghg="$ZBIN/ghg"; assert "$ghg" is_executable
  $ghg version; assert $state equals 0
}
@test 'ghq' { # Remote repository management made easy
  run zinit for @x-motemen/ghq; assert $state equals 0
  local ghq="$ZBIN/ghq"; assert "$ghq" is_executable
  $ghq --version; assert $state equals 0
}
@test 'git-absorb' { # git commit --fixup, but automatic
  run zinit for @tummychow/git-absorb; assert $state equals 0
  local git_absorb="$ZBIN/git-absorb"; assert "$git_absorb" is_executable
  $git_absorb --version; assert $state equals 0
}
@test 'git-chglog' { # CHANGELOG generator implemented in Go
  run zinit for @git-chglog/git-chglog; assert $state equals 0
  local git_chglog="$ZBIN/git-chglog"; assert "$git_chglog" is_executable
  $git_chglog --version; assert $state equals 0
}
@test 'git-mkver' { # Automatic Semantic Versioning for git based software development
  run zinit for @idc101/git-mkver; assert $state equals 0
  local git_mkver="$ZBIN/git-mkver"; assert "$git_mkver" is_executable
  # use git-mkver info because --version exits with 130?
  $git_mkver info; assert $state equals 0
}
@test 'git-sizer' { # Compute various size metrics for a Git repository, flagging those that might cause problems
  run zinit for @github/git-sizer; assert $state equals 0
  local git_sizer="$ZBIN/git-sizer"; assert "$git_sizer" is_executable
  $git_sizer --version; assert $state equals 0
}
@test 'glow' { # Render markdown on the CLI, with pizzazz
  run zinit for @charmbracelet/glow; assert $state equals 0
  local git_sizer="$ZBIN/glow"; assert "$git_sizer" is_executable
  $git_sizer --version; assert $state equals 0
}
@test 'go-james' { # James is your butler and helps you to create, build, debug, test and run your Go projects
  run zinit for @pieterclaerhout/go-james; assert $state equals 0
  local git_sizer="$ZBIN/go-james"; assert "$git_sizer" is_executable
  $git_sizer version; assert $state equals 0
}
@test 'go-swagger' { # Swagger 2.0 implementation for go
  run zinit lbin'!* -> go-swagger' for @go-swagger/go-swagger; assert $state equals 0
  local git_sizer="$ZBIN/go-swagger"; assert "$git_sizer" is_executable
  $git_sizer version; assert $state equals 0
}
@test 'gojq' { # Pure Go implementation of jq
  run zinit for @itchyny/gojq; assert $state equals 0
  local git_sizer="$ZBIN/gojq"; assert "$git_sizer" is_executable
  $git_sizer --version; assert $state equals 0
}
@test 'gomi' { # Replacement for UNIX rm command
  run zinit for @b4b4r07/gomi; assert $state equals 0
  local gomi="$ZBIN/gomi"; assert "$gomi" is_executable
  $gomi --version; assert $state equals 0
}
@test 'gosu' { # Simple Go-based setuid+setgid+setgroups+exec
  [[ $OSTYPE =~ "darwin*" ]] && skip "on $os_type"
  run zinit lbin'!* -> gosu' for @tianon/gosu; assert $state equals 0
  local gosu="$ZBIN/gosu"; assert "$gosu" is_executable
  $gosu --version; assert $state equals 0
}
@test 'got' { # Simple golang package and CLI tool to download large files faster than cURL and Wget
  run zinit for @melbahja/got; assert $state equals 0
  local got="$ZBIN/got"; assert "$got" is_executable
  $got --version; assert $state equals 0
}
@test 'gotestfmt' { # go test output for humans
  run zinit for @GoTestTools/gotestfmt; assert $state equals 0
  local gotestfmt="$ZBIN/gotestfmt"; assert "$gotestfmt" is_executable
  $gotestfmt --help; assert $state equals 0
}
@test 'gothanks' { # go test output for humans
  run zinit for @psampaz/gothanks; assert $state equals 0
  local gothanks="$ZBIN/gothanks"; assert "$gothanks" is_executable
  $gothanks --help; assert $state equals 0
}
@test 'grex' { # A command-line tool and library for generating regular expressions from user-provided test cases
  run zinit for @pemistahl/grex; assert $state equals 0
  local grex="$ZBIN/grex"; assert "$grex" is_executable
  $grex --version; assert $state equals 0
}
@test 'gron' { # go test output for humans
  run zinit for @tomnomnom/gron; assert $state equals 0
  local gron="$ZBIN/gron"; assert "$gron" is_executable
  $gron --version; assert $state equals 0
}
@test 'hadolint' { # Dockerfile linter, validate inline bash, written in Haskell
  run zinit ver'v2.12.1-beta' lbin'!hadolint* -> hadolint' for @hadolint/hadolint; assert $state equals 0
  local hadolint="$ZBIN/hadolint"; assert "$hadolint" is_executable
  run $hadolint --version; assert $state equals 0
}
# TODO: gh-r does not find older assets anymore (possible bug from https://github.com/zdharma-continuum/zinit/pull/373)
@test 'heksa' { # CLI hex dumper with colors
  [[ $OSTYPE =~ "darwin*" ]] && skip "on $os_type"
  run zinit for @raspi/heksa; assert $state equals 0
  local heksa="$ZBIN/heksa"; assert "$heksa" is_executable
  $heksa --version; assert $state equals 0
}
@test 'helix' { # A post-modern modal text editor
  run zinit lbin'!**/hx' for @helix-editor/helix; assert $state equals 0
  local helix="$ZBIN/hx"; assert "$helix" is_executable
  $helix --version; assert $state equals 0
}
@test 'hexyl' { # A command-line hex viewer
  run zinit for @sharkdp/hexyl; assert $state equals 0
  local hexyl="$ZBIN/hexyl"; assert "$hexyl" is_executable
  $hexyl --version; assert $state equals 0
}
@test 'hit-on' { # Git Workflow Helper Tool
  run zinit lbin'!* -> hit' for kowainik/hit-on; assert $state equals 0
  local hit="$ZBIN/hit"; assert "$hit" is_executable
  $hit --version; assert $state equals 0
}
@test 'hoofli' { # Generate PlantUML diagrams from Chrome or Firefox network inspection
  run zinit lbin'!* -> hoofli' for @dnnrly/hoofli; assert $state equals 0
  local hoofli="$ZBIN/hoofli"; assert "$hoofli" is_executable
  $hoofli -h; assert $state equals 0
}
@test 'hors' { # instant coding answers via the command line
  [[ $OSTYPE =~ "linux*" ]] && skip "skipped on $os_type"
  run zinit for @WindSoilder/hors; assert $state equals 0
  local hors="$ZBIN/hors"; assert "$hors" is_executable
  $hors --version; assert $state equals 0
}
@test 'htmlq' { # Like jq, but for HTML
  run zinit for @mgdm/htmlq; assert $state equals 0
  local htmlq="$ZBIN/htmlq"; assert "$htmlq" is_executable
  run "$htmlq" --version; assert $state equals 0
}
@test 'hyperfine' { # A command-line benchmarking tool
  run zinit bpick'*tar.gz*' for @sharkdp/hyperfine; assert $state equals 0
  local hyperfine="$ZBIN/hyperfine"; assert "$hyperfine" is_executable
  $hyperfine --version; assert $state equals 0
}
@test 'igo' { # Improved Go Syntax (transpiler)
  run zinit for @rocketlaunchr/igo; assert $state equals 0
  local igo="$ZBIN/igo"; assert "$igo" is_executable
  $igo version; assert $state equals 0
}
@test 'insect' { # High precision scientific calculator with support for physical units
  run zinit ver'v5.7.0' lbin'!* -> insect' for @sharkdp/insect; assert $state equals 0
  local insect="$ZBIN/insect"; assert "$insect" is_executable
  $insect help; assert $state equals 0
}
@test 'joincap' { # Merge multiple pcap files together, gracefully
  run zinit lbin'!* -> joincap' for @assafmo/joincap; assert $state equals 0
  local joincap="$ZBIN/joincap"; assert "$joincap" is_executable
  $joincap --version; assert $state equals 0
}
@test 'jq' { # Command-line JSON processor
  run zinit lbin'!* -> jq' for stedolan/jq; assert $state equals 0
  local jq="$ZBIN/jq"; assert "$jq" is_executable
  $jq --version; assert $state equals 0
}
@test 'just' { # Just a command runner
  run zinit for @casey/just; assert $state equals 0
  local just="$ZBIN/just"; assert "$just" is_executable
  $just --version; assert $state equals 0
}
@test 'keepassxc' { # a cross-platform community-driven port of the Windows application Keepass Password Safe
  [[ $OSTYPE =~ 'linux*' ]] && skip "skipped on $os_type"
  run zinit for @keepassxreboot/keepassxc; assert $state equals 0
  local keepassxc="$ZBIN/keepassxc"; assert "$keepassxc" is_executable
  $keepassxc -v; assert $state equals 0
}
@test 'ko' { # Build and deploy Go applications on Kubernetes
  run zinit for @ko-build/ko; assert $state equals 0
  local ko="$ZBIN/ko"; assert "$ko" is_executable
  $ko version; assert $state equals 0
}
@test 'kopia' { # Cross-platform backup tool with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication
run zinit for @kopia/kopia; assert $state equals 0
local kopia="$ZBIN/kopia"; assert "$kopia" is_executable
$kopia --version; assert $state equals 0
}
@test 'krew' { # Build and deploy Go applications on Kubernetes
  run zinit lbin'!krew* -> krew' for @kubernetes-sigs/krew; assert $state equals 0
  local krew="$ZBIN/krew"; assert "$krew" is_executable
  $krew version; assert $state equals 0
}
@test 'lazygit' { # simple terminal UI for git commands
  run zinit for @jesseduffield/lazygit; assert $state equals 0
  local lazygit="$ZBIN/lazygit"; assert "$lazygit" is_executable
  $lazygit --version; assert $state equals 0
}
@test 'lemmeknow' { # The fastest way to identify anything
  run zinit lbin'!* -> lemmeknow' for @swanandx/lemmeknow; assert $state equals 0
  local lemmeknow="$ZBIN/lemmeknow"; assert "$lemmeknow" is_executable
  run "$lemmeknow" --version; assert $state equals 0
}
@test 'lf' { # Terminal file manager
  run zinit for @gokcehan/lf; assert $state equals 0
  local lf="$ZBIN/lf"; assert "$lf" is_executable
  $lf -version; assert $state equals 0
}
@test 'lfs' { # A linux utility to get information on filesystems, like df but better
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit lbin'!**/x86_64-linux/* -> lfs' for @Canop/lfs; assert $state equals 0
  local lfs="$ZBIN/lfs"; assert "$lfs" is_executable
  run $lfs --version; assert $state equals 0
}
@test 'lnav' { # advanced log file viewer
  run zinit for @tstack/lnav; assert $state equals 0
  local lnav="$ZBIN/lnav"; assert "$lnav" is_executable
  $lnav --version; assert $state equals 0
}
@test 'lsd' { # The next gen ls command
  run zinit for @lsd-rs/lsd; assert $state equals 0
  local lsd="$ZBIN/lsd"; assert "$lsd" is_executable
  $lsd --version; assert $state equals 0
}
@test 'lstf' { # The aggregated TCP flows printer in Linux
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit for @yuuki/lstf; assert $state equals 0
  local lstf="$ZBIN/lstf"; assert "$lstf" is_executable
  $lstf --version; assert $state equals 0
}
@test 'macchina' { # A system information frontend with an emphasis on performance
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit lbin'!* -> macchina' for @macchina-cli/macchina; assert $state equals 0
  local macchina="$ZBIN/macchina"; assert "$macchina" is_executable
  run $macchina --version; assert $state equals 0
}
@test 'mage' { # A Make/rake-like dev tool using Go
  run zinit for @magefile/mage; assert $state equals 0
  local mage="$ZBIN/mage"; assert "$mage" is_executable
  $mage -version; assert $state equals 0
}
@test 'mas' { # Mac App Store command line interface
  [[ $OSTYPE =~ 'linux*' ]] && skip "skipped on $os_type"
  run zinit lbin'!**/bin/mas' for @mas-cli/mas; assert $state equals 0
  local mas="$ZBIN/mas"; assert "$mas" is_executable
  $mas version; assert $state equals 0
}
@test 'mdbook' { # Create book from markdown files. Like Gitbook but implemented in Rust
  run zinit for @rust-lang/mdBook; assert $state equals 0
  local mdbook="$ZBIN/mdbook"; assert "$mdbook" is_executable
  $mdbook --version; assert $state equals 0
}
@test 'mdcat' { # cat for markdown
  run zinit for @swsnr/mdcat; assert $state equals 0
  local mdcat="$ZBIN/mdcat"; assert "$mdcat" is_executable
  run "$mdcat" --version; assert $state equals 0
}
@test 'micro' { # A modern and intuitive terminal-based text editor
  run zinit for @zyedidia/micro; assert $state equals 0
  local micro="$ZBIN/micro"; assert "$micro" is_executable
  $micro --version; assert $state equals 0
}
@test 'miniserve' { # For when you really just want to serve some files over HTTP right now!
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit lbin'!* -> miniserve' for @svenstaro/miniserve; assert $state equals 0
  local miniserve="$ZBIN/miniserve"; assert "$miniserve" is_executable
  run $miniserve --help; assert $state equals 0
}
@test 'mkcert' { # A simple zero-config tool to make locally trusted development certificates
  run zinit lbin'!* -> mkcert' for @FiloSottile/mkcert; assert $state equals 0
  local mkcert="$ZBIN/mkcert"; assert "$mkcert" is_executable
  $mkcert --version; assert $state equals 0
}
@test 'mmake' { # A Make/rake-like dev tool using Go
  run zinit for ver'v1.4.0' @tj/mmake; assert $state equals 0
  local mmake="$ZBIN/mmake"; assert "$mmake" is_executable
  $mmake --version; assert $state equals 0
}
@test 'mmv' { # rename multiple files with editor
  run zinit for @itchyny/mmv; assert $state equals 0
  local mmv="$ZBIN/mmv"; assert "$mmv" is_executable
  $mmv --version; assert $state equals 0
}
@test 'mob' { # rename multiple files with editor
  run zinit for @remotemobprogramming/mob; assert $state equals 0
  local mob="$ZBIN/mob"; assert "$mob" is_executable
  $mob --version; assert $state equals 0
}
@test 'mocword' { # Predict next words
  run zinit lbin'!**/mocword* -> mocword' for @high-moctane/mocword; assert $state equals 0
  local mocword="$ZBIN/mocword"; assert "$mocword" is_executable
  $mocword --version; assert $state equals 0
}
@test 'monolith' { # CLI tool for saving complete web pages as a single HTML file
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit lbin'!* -> monolith' for @Y2Z/monolith; assert $state equals 0
  local monolith="$ZBIN/monolith"; assert "$monolith" is_executable
  run $monolith --version; assert $state equals 0
}
@test 'moonwalk' { # Cover your tracks during Linux Exploitation by leaving zero traces on system logs and filesystem timestamps
  run zinit lbin'!**/moonwalk* -> moonwalk' for @mufeedvh/moonwalk; assert $state equals 0
  local moonwalk="$ZBIN/moonwalk"; assert "$moonwalk" is_executable
  $moonwalk --version; assert $state equals 0
}
@test 'navi' { # Declarative, asynchronous routing for React
  run zinit for @denisidoro/navi && assert $state equals 0
  local navi="$ZBIN/navi" && assert "$navi" is_executable
  $navi --version && assert $state equals 0
}
@test 'onefetch' { # Git repository summary on your terminal
  run zinit for @o2sh/onefetch; assert $state equals 0
  local onefetch="$ZBIN/onefetch"; assert "$onefetch" is_executable
  $onefetch --version; assert $state equals 0
}
@test 'ouch' { # Painless compression and decompression for your terminal
  run zinit for @ouch-org/ouch; assert $state equals 0
  local ouch="$ZBIN/ouch"; assert "$ouch" is_executable
  run "$ouch" --help; assert $state equals 0
}
@test 'pastel' { # A command-line tool to generate, analyze, convert and manipulate colors
  run zinit for @sharkdp/pastel; assert $state equals 0
  local pastel="$ZBIN/pastel"; assert "$pastel" is_executable
  run "$pastel" --version; assert $state equals 0
}
@test 'peco' { # Simplistic interactive filtering tool
  run zinit for @peco/peco; assert $state equals 0
  local peco="$ZBIN/peco"; assert "$peco" is_executable
  run $peco --version; assert $state equals 0
}
@test 'piknik' { # Copy/paste anything over the network
  run zinit for @jedisct1/piknik; assert $state equals 0
  local piknik="$ZBIN/piknik"; assert "$piknik" is_executable
  run $piknik --version; assert $state equals 0
}
@test 'pipr' { # A tool to interactively write shell pipelines.
  [[ $OSTYPE =~ 'darwin*' ]] && skip "skipped on $os_type"
  run zinit for @Elkowar/pipr; assert $state equals 0
  local pipr="$ZBIN/pipr"; assert "$pipr" is_executable
  run "$pipr" --help; assert $state equals 0
}
@test 'pmy' { # General purpose context-aware zsh completion engine powered by fuzzy finder
  run zinit for @relastle/pmy; assert $state equals 0
  local pmy="$ZBIN/pmy"; assert "$pmy" is_executable
  run "$pmy" --version; assert $state equals 0
}
@test 'procs' { # A modern replacement for ps written in Rust
  run zinit for @dalance/procs; assert $state equals 0
  local procs="$ZBIN/procs"; assert "$procs" is_executable
  run "$procs" --version; assert $state equals 0
}
@test 'pulumi' { # A modern replacement for ps written in Rust
  run zinit for @pulumi/pulumi; assert $state equals 0
  local pulumi="$ZBIN/pulumi"; assert "$pulumi" is_executable
  run "$pulumi" version; assert $state equals 0
}
@test 'qsv' { # CSVs sliced, diced & analyzed.
  run zinit for @jqnatividad/qsv; assert $state equals 0
  local qsv="$ZBIN/qsv"; assert "$qsv" is_executable
  run "$qsv" --version; assert $state equals 0
}
@test 'rare' { # Realtime regex-extraction and aggregation into common formats such as histograms, bar graphs, tables, etc
  run zinit for @zix99/rare; assert $state equals 0
  local rare="$ZBIN/rare"; assert "$rare" is_executable
  run "$rare" --version; assert $state equals 0
}
@test 'rargs' { # xargs + awk with pattern matching support
  run zinit for @lotabout/rargs; assert $state equals 0
  local rargs="$ZBIN/rargs"; assert "$rargs" is_executable
  run "$rargs" --version; assert $state equals 0
}
@test 'rclone' { # Realtime regex-extraction and aggregation into common formats such as histograms, bar graphs, tables, etc
  run zinit for @rclone/rclone; assert $state equals 0
  local rclone="$ZBIN/rclone"; assert "$rclone" is_executable
  run "$rclone" --version; assert $state equals 0
}
@test 'reg' { # Docker registry v2 command line client and repo listing generator with security checks
  run zinit lbin'!* -> reg' for @genuinetools/reg; assert $state equals 0
  local reg="$ZBIN/reg"; assert "$reg" is_executable
  run "$reg" version; assert $state equals 0
}
# TODO: gh-r does not find older assets anymore (possible bug from https://github.com/zdharma-continuum/zinit/pull/373)
@test 'rip' { # A safe and ergonomic alternative to rm
  run zinit ver'0.11.3' for @nivekuil/rip; assert $state equals 0
  local rip="$ZBIN/rip"; assert "$rip" is_executable
  run "$rip" --version; assert $state equals 0
}
@test 'ripgrep' { # Recursively searches directories for a regex pattern while respecting your gitignore
  run zinit lbin'!**/rg' for @BurntSushi/ripgrep; assert $state equals 0
  local rg="$ZBIN/rg"; assert "$rg" is_executable
  run "$rg" --version; assert $state equals 0
}
@test 'ripsecrets' { # A command-line tool to prevent committing secret keys into your source code
  run zinit for @sirwart/ripsecrets; assert $state equals 0
  local ripsecrets="$ZBIN/ripsecrets"; assert "$ripsecrets" is_executable
  run "$ripsecrets" --version; assert $state equals 0
}
@test 'rnr' { # A command-line tool to batch rename files and directories
  run zinit for @ismaelgv/rnr; assert $state equals 0
  local rnr="$ZBIN/rnr"; assert "$rnr" is_executable
  run "$rnr" --version; assert $state equals 0
}
@test 'rust-analyzer' { # A Rust compiler front-end for IDEs
  [[ $OSTYPE =~ "linux*" ]] && skip "skipped on $os_type"
  run zinit lbin'!* -> rust-analyzer' for @rust-lang/rust-analyzer; assert $state equals 0
  local rust_analyzer="$ZBIN/rust-analyzer"; assert "$rust_analyzer" is_executable
  run "$rust_analyzer" --version; assert $state equals 0
}
@test 's' { # Open a web search in your terminal
  run zinit for @zquestz/s; assert $state equals 0
  local s="$ZBIN/s"; assert "$s" is_executable
  run "$s" --version; assert $state equals 0
}
@test 'sd' { # Intuitive find & replace CLI a.k.a modern sed
  run zinit lbin'!sd* -> sd' for @chmln/sd; assert $state equals 0
  local sd="$ZBIN/sd"; assert "$sd" is_executable
  run "$sd" --version; assert $state equals 0
}
@test 'shellcheck' { # a static analysis tool for shell scripts
  run zinit for @koalaman/shellcheck; assert $state equals 0
  local shellcheck="$ZBIN/shellcheck"; assert "$shellcheck" is_executable
  run "$shellcheck" --version; assert $state equals 0
}
@test 'shfmt' { # A shell parser, formatter, and interpreter with bash support
  run zinit lbin'!**/sh* -> shfmt' for @mvdan/sh; assert $state equals 0
  local shfmt="$ZBIN/shfmt"; assert "$shfmt" is_executable
  run $shfmt --version; assert $state equals 0
}
@test 'skim' { # Fuzzy Finder in rust
  run zinit ver'v0.9.4' for @lotabout/skim; assert $state equals 0
  local skim="$ZBIN/sk"; assert "$skim" is_executable
  run "$skim" --version; assert $state equals 0
}
@test 'starship' { # The minimal, blazing-fast, and infinitely customizable prompt for any shell
  run zinit for @starship/starship; assert $state equals 0
  local starship="$ZBIN/starship"; assert "$starship" is_executable
  run "$starship" --version; assert $state equals 0
}
@test 'stern' { # Multi pod and container log tailing for Kubernetes
  run zinit for @stern/stern; assert $state equals 0
  local stern="$ZBIN/stern"; assert "$stern" is_executable
  run "$stern" --version; assert $state equals 0
}
@test 'tealdeer' { # A very fast implementation of tldr in Rust
  run zinit lbin'!tealdeer* -> tealdeer' for @dbrgn/tealdeer; assert $state equals 0
  local tealdeer="$ZBIN/tealdeer"; assert "$tealdeer" is_executable
  run "$tealdeer" --version; assert $state equals 0
}
@test 'tin-summer' { # Find build artifacts that are taking up disk space
  run zinit for @vmchale/tin-summer; assert $state equals 0
  local tin_summer="$ZBIN/sn"; assert "$tin_summer" is_executable
  run "$tin_summer" --version; assert $state equals 0
}
@test 'tokei' { # Count your code, quickly.
  run zinit lbin'!*tokei -> tokei' ver'v12.1.1' for @XAMPPRocky/tokei; assert $state equals 0
  local tokei="$ZBIN/tokei"; assert "$tokei" is_executable
  $tokei --version; assert $state equals 0
}
@test 'topgrade' { # Upgrade everything
  run zinit for @r-darwish/topgrade; assert $state equals 0
  local topgrade="$ZBIN/topgrade"; assert "$topgrade" is_executable
  $topgrade --version; assert $state equals 0
}
@test 'tre' { # Tree command, improved
  run zinit for @dduan/tre; assert $state equals 0
  local tre="$ZBIN/tre"; assert "$tre" is_executable
  $tre --version; assert $state equals 0
}
@test 'tv' { # A cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment
  run zinit for @uzimaru0000/tv; assert $state equals 0
  local tv="$ZBIN/tv"; assert "$tv" is_executable
  $tv --version; assert $state equals 0
}
@test 'up' { # Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS
  run zinit lbin'!up* -> up' for akavel/up; assert $state equals 0
  local up="$ZBIN/up"; assert "$up" is_executable
  run $up -h; assert $output contains "up is the Ultimate Plumber"
}
@test 'volta-cli' { # JS Toolchains as Code
  [[ "$OSTYPE" =~ 'linux*' ]] && skip 'Volta CLI skipped on Linux'
  run zinit for @volta-cli/volta; assert $state equals 0
  local volta="$ZBIN/volta"; assert "$volta" is_executable
  run $volta --version; assert $state equals 0
}
@test 'watchexec' { # Executes commands in response to file modifications
  run zinit for @watchexec/watchexec; assert $state equals 0
  local watchexec="$ZBIN/watchexec"; assert "$watchexec" is_executable
  run "$watchexec" --version; assert $state equals 0
}
@test 'whalebrew' { # Homebrew, but with Docker images
  run zinit lbin'!* -> whalebrew' for whalebrew/whalebrew; assert $state equals 0
  local whalebrew="$ZBIN/whalebrew"; assert "$whalebrew" is_executable
  run $whalebrew version; assert $state equals 0
}
@test 'wifiqr' { # Create a QR code with your Wi-Fi login details
  run zinit lbin'!* -> wifiqr' for reugn/wifiqr; assert $state equals 0
  local wifiqr="$ZBIN/wifiqr"; assert "$wifiqr" is_executable
  run $wifiqr --version; assert $state equals 0
}
@test 'wtf' { # The personal information dashboard for your terminal
  run zinit lbin'!**/wtf* -> wtf' for wtfutil/wtf; assert $state equals 0
  local wtf="$ZBIN/wtf"; assert "$wtf" is_executable
  run $wtf --version; assert $state equals 0
}
@test 'xh' { # Friendly and fast tool for sending HTTP requests
  run zinit for @ducaale/xh; assert $state equals 0
  local xh="$ZBIN/xh"; assert "$xh" is_executable
  run $xh --version; assert $state equals 0
}
@test 'xsv' { # A fast CSV command line toolkit written in Rust.
  run zinit for @BurntSushi/xsv; assert $state equals 0
  local xsv="$ZBIN/xsv"; assert "$xsv" is_executable
  run "$xsv" --version; assert $state equals 0
}
@test 'yabai' { # A tiling window manager for macOS based on binary space partitioning
  [[ $OSTYPE =~ 'linux*' ]] && skip 'Yabai skipped on Linux'
  run zinit for @koekeishiya/yabai; assert $state equals 0
  local yabai="$ZBIN/yabai"; assert "$yabai" is_executable
  $yabai --version; assert $state equals 0
}
@test 'yq' { # a portable command-line YAML, JSON and XML processor
  run zinit lbin'!* -> yq' for @mikefarah/yq; assert $state equals 0
  local yq="$ZBIN/yq"; assert "$yq" is_executable
  run $yq --version; assert $state equals 0
}
@test 'zed' { # Tooling for super-structured data: a new and easier way to manipulate data
  run zinit for @brimdata/zed; assert $state equals 0
  local zed="$ZBIN/zed"; assert "$zed" is_executable
  run $zed --version; assert $state equals 0
}
@test 'zoxide' { # A smarter cd command
  run zinit for @ajeetdsouza/zoxide; assert $state equals 0
  local zoxide="$ZBIN/zoxide"; assert "$zoxide" is_executable
  run $zoxide --version; assert $state equals 0
}

# vim:ft=zsh:sw=2:sts=2:et:foldmarker={,}:foldmethod=marker
